Don't scrub broken pages
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 8 Feb 2010 10:18:14 +0000 (10:18 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 8 Feb 2010 10:18:14 +0000 (10:18 +0000)
Don't touch the poison pages when scrub the pages. Consuming poison
page will contaminate the CPU context and may cause system crash.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
xen/common/page_alloc.c

index 0e1925a3bb13d1c4401c19cbda3051a4e6d6149d..735c207e80cbb6537528c3d204ba12448f5f9df7 100644 (file)
@@ -1256,6 +1256,9 @@ void scrub_one_page(struct page_info *pg)
 {
     void *p = __map_domain_page(pg);
 
+    if ( unlikely(pg->count_info & PGC_broken) )
+        return;
+
 #ifndef NDEBUG
     /* Avoid callers relying on allocations returning zeroed pages. */
     memset(p, 0xc2, PAGE_SIZE);